Component({
  data: {
    books:[],
  },
  properties: {
    list:{
      type: Object,
      default: []
    }
  },
  attached(){
    this.setData({
      books:this.data.list,
    })
  },
  methods: {
    toReader: function (e) {
      console.log('botton',e);
      const bookid = e.currentTarget.dataset.bookid;
      const name = e.currentTarget.dataset.name;
      var that = this;
      let serialNumber = '1';
      if (e.currentTarget.dataset.serialnumber) {
        serialNumber = e.currentTarget.dataset.serialnumber;
      }
      wx.navigateTo({
        url: '../reader/reader?id=' + bookid + '&serialNumber='+serialNumber+'&title=' + name,
      });
    },
  }
})